package com.cx.mapper;

import com.cx.pojo.Goods;
import com.cx.pojo.GoodsExample;
import com.cx.pojo.GoodsWithBLOBs;
import com.cx.pojo.SeckillGoods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface GoodsMapper {
    int countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(GoodsWithBLOBs record);

    int insertSelective(GoodsWithBLOBs record);

    List<GoodsWithBLOBs> selectByExampleWithBLOBs(GoodsExample example);

    List<Goods> selectByExample(GoodsExample example);

    GoodsWithBLOBs selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") GoodsWithBLOBs record, @Param("example") GoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") GoodsWithBLOBs record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(GoodsWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(GoodsWithBLOBs record);

    int updateByPrimaryKey(Goods record);

    List<Goods> selectAll();

    List<Goods> selectByGoodName(String goodName);
    List<Goods> searchByGoodName(String goodName);

    List<Goods> selectByGoodId(@Param("goodId") int goodId);
    Goods findByGoodId( int goodId);

    List<Goods> selectBySelectiveAndPage(String goodName,Integer type, Integer types, BigDecimal lowPrice, BigDecimal upPrice);




}